package com.yunchao.bank.business.data.model

import com.google.gson.annotations.SerializedName

data class TeamIssueInfoApiModel(
    /**
     * 团队 ID
     */
    @SerializedName("teamId") val teamId: String? = null,
    /**
     * 团队名称
     */
    @SerializedName("teamName") val teamName: String? = null
)

data class StackIssueInfoApiModel(
    /**
     * 栈位编码
     */
    @SerializedName("sstackCode") val sstackCode: String? = null,
    /**
     * 栈位名称
     */
    @SerializedName("sstackName") val sstackName: String? = null
)

data class PackIssueInfoApiModel(
    /**
     * 封包编号
     */
    @SerializedName("sackNo") val sackNo: String? = null,
    /**
     * 券别类型 ID
     */
    @SerializedName("voucherTypeID") val voucherTypeID: String? = null,
    /**
     * 券别类型名称
     */
    @SerializedName("voucherTypeName") val voucherTypeName: String? = null,
    /**
     * 券别面值
     */
    @SerializedName("val") val value: String? = null,

    /**
     * 纸张类型 ID
     */
    @SerializedName("paperTypeID") val paperTypeID: String? = null,
    /**
     * 纸张类型名称
     */
    @SerializedName("paperTypeName") val paperTypeName: String? = null,
    /**
     * 捆数
     */
    @SerializedName("bundles") val bundles: String? = null,
    /**
     * 把数
     */
    @SerializedName("tie") val tie: String? = null,
    /**
     * 封包金额
     */
    @SerializedName("sackMoney") val sackMoney: String? = null,

    /**
     * 操作日期时间
     */
    @SerializedName("oprDT") val oprDT: String? = null,

    /**
     * 机构 ID
     */
    @SerializedName("organID") val organID: String? = null,
    /**
     * 机构名称
     */
    @SerializedName("organName") val organName: String? = null,

    /**
     * 是否必出箱 0-否 1-是
     */
    @SerializedName("mustOutFlag") val mustOutFlag: String? = null,
    /**
     * 库间编号
     */
    @SerializedName("sstackCode") val sstackCode: String? = null,
    /**
     * 库间名称
     */
    @SerializedName("sstackName") val sstackName: String? = null,

    @SerializedName("isCheck") val isCheck: String? = null,

    /**
     * 是否锁闭 0-否 1-是
     */
    @SerializedName(
        value = "isUnPacket",
        alternate = ["isUnPack"]
    ) val isUnPacket: String? = null,

    /**
     * 总金额
     */
    @SerializedName("totalMoney") val totalMoney: String? = null,

    /**
     * “0”标识有签封，“1”标识无签封。
     */
    @SerializedName("haveBoxInfo") val haveBoxInfo: String? = null,

    /**
     * 业务序号
     */
    @SerializedName("transNo") val transNo: String? = null,

    )

data class BusinessIssueInfoApiModel(
    /**
     * 业务代码
     */
    @SerializedName("code") val code: Int,

    /**
     * 业务信息列表
     */
    @SerializedName(
        value = "busiinfolist",
        alternate = ["busiInfolist", "busiInfoList", "outDetailList"]
    ) val busiInfoList: List<PackIssueInfoApiModel>? = null,
    /**
     * 包装信息列表
     */
    @SerializedName(
        value = "packinfolist",
        alternate = ["stockPackInfoList", "stockList", "packInfoList", "paymentSackList", "scanSortList"]
    ) val packInfoList: List<PackIssueInfoApiModel>? = null,
    /**
     * 栈信息列表
     */
    @SerializedName("stackInfoList") val stackInfoList: List<StackIssueInfoApiModel>? = null,

    /**
     * 团队信息列表
     */
    @SerializedName("teamList") val teamList: List<TeamIssueInfoApiModel>? = null

    )


// 电子签封闭锁下发任务
data class SealLockIssueTaskApiModel(
    /**
     * 业务代码
     */
    @SerializedName("code") val code: Int,
    /**
     * 业务信息列表
     */
    @SerializedName("busiinfolist") val businessInfoList: List<PackIssueInfoApiModel>? = null,
    /**
     * 包装信息列表
     */
    @SerializedName("packinfolist") val packInfoList: List<PackIssueInfoApiModel>? = null,
    /**
     * 栈信息列表
     */
    @SerializedName("stackInfoList") val stackInfoList: List<StackIssueInfoApiModel>? = null
)


// 电子签封开锁下发任务
data class SealUnlockIssueTaskApiModel(
    /**
     * 业务代码
     */
    @SerializedName("code") val code: Int,
    /**
     * 库存包装信息列表
     */
    @SerializedName("stockPackInfoList") val stockPackInfoList: List<PackIssueInfoApiModel>? = null
)


// 电子签封分配下发任务
data class SealAllocationIssueTaskApiModel(
    /**
     * 业务代码
     */
    @SerializedName("code") val code: Int,
    /**
     * 库存信息列表
     */
    @SerializedName("stockList") val stockList: List<PackIssueInfoApiModel>? = null,
    /**
     * 团队信息列表
     */
    @SerializedName("teamList") val teamList: List<TeamIssueInfoApiModel>? = null
)

// 电子签封登记下发任务
data class SealRegistrationIssueTaskApiModel(
    /**
     * 业务代码
     */
    @SerializedName("code") val code: Int,
    /**
     * 业务信息列表
     */
    @SerializedName("busiinfolist") val businessInfoList: List<PackIssueInfoApiModel>? = null,
    /**
     * 包装信息列表
     */
    @SerializedName("packInfoList") val packInfoList: List<PackIssueInfoApiModel>? = null
)


// 电子签封出库下发任务
data class SealOutboundIssueTaskApiModel(
    /**
     * 业务代码
     */
    @SerializedName("code") val code: Int,
    /**
     * 业务信息列表
     */
    @SerializedName("busiInfoList") val businessInfoList: List<PackIssueInfoApiModel>? = null,
    /**
     * 库存包装信息列表
     */
    @SerializedName("stockPackInfoList") val stockPackInfoList: List<PackIssueInfoApiModel>? = null
)


// 电子签封入库下发任务
data class SealInboundIssueTaskApiModel(
    /**
     * 业务代码
     */
    @SerializedName("code") val code: Int,
    /**
     * 业务信息列表
     */
    @SerializedName("busiInfoList") val busiInfoList: List<PackIssueInfoApiModel>? = null,

    @SerializedName("stackInfoList") val stackInfoList: List<StackIssueInfoApiModel>? = null,
    /**
     * 库存包装信息列表
     */
    @SerializedName("paymentSackList") val paymentSackList: List<PackIssueInfoApiModel>? = null
)


// 电子签封交接下发任务
data class SealHandoverIssueTaskApiModel(
    /**
     * 业务代码
     */
    @SerializedName("code") val code: Int,
    /**
     * 业务信息列表
     */
    @SerializedName("outDetailList") val outDetailList: List<PackIssueInfoApiModel>? = null,
    /**
     * 库存包装信息列表
     */
    @SerializedName("scanSortList") val scanSortList: List<PackIssueInfoApiModel>? = null
)


// 电子签封核对下发任务
data class SealVerificationIssueTaskApiModel(
    /**
     * 业务代码
     */
    @SerializedName("code") val code: Int,
    /**
     * 库存包装信息列表
     */
    @SerializedName("stockList") val stockList: List<PackIssueInfoApiModel>? = null
)


// 空电子签封入库下发任务
data class EmptySealInboundIssueTaskApiModel(
    /**
     * 业务代码
     */
    @SerializedName("code") val code: Int,
    /**
     * 业务信息列表
     */
    @SerializedName("packInfoList") val packInfoList: List<PackIssueInfoApiModel>? = null,
    /**
     * 库存包装信息列表
     */
    @SerializedName("stackInfoList") val stackInfoList: List<StackIssueInfoApiModel>? = null
)


// 入库核对下发任务
data class InboundVerificationIssueTaskApiModel(
    /**
     * 业务代码
     */
    @SerializedName("code") val code: Int,
    /**
     * 库存包装信息列表
     */
    @SerializedName("packInfoList") val packInfoList: List<PackIssueInfoApiModel>? = null
)


/**

private class SaveLargeStringPartsTask extends AsyncTask<String, Void, Boolean> {
@Override
protected Boolean doInBackground(String... strings) {
String largeString = strings[0];
int index = 0;
int partNumber = 0;
List<LargeStringPart> partsList = new ArrayList<>();
while (index < largeString.length()) {
int endIndex = Math.min(index + PART_SIZE, largeString.length());
String part = largeString.substring(index, endIndex);
LargeStringPart largeStringPart = new LargeStringPart(part, partNumber);
partsList.add(largeStringPart);
index = endIndex;
partNumber++;
}
appDatabase.largeStringPartDao().insertLarge(partsList);
return true;
}

@Override
protected void onPostExecute(Boolean result) {
if (result) {
Toast.makeText(MainActivity.this, "Large string parts saved successfully", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(MainActivity.this, "Failed to save large string parts", Toast.LENGTH_SHORT).show();
}
}
}
 */